var mutations = {
    setSearchShow:function(state,value){
        state.searchShow = value;
    },
    setHotImg:function(state,value){
        state.hotImgThen = value;
    },
    // 全部分类
    setClassify(state,value){
        state.classify = value;
    },
    // 筛选数据
    setFilter(state,value){
        state.FilterShopping = value;
    },
    // 商品列表
    setGoodsList(state,value){
        state.goodsList = value;
    },
    // 是否显示筛选框
    setAniShow(state,value){
        state.aniShow = value;
    },
    // 产品详情
    setProduct(state,value){
        state.product = value;
        state.productImg = [];
            value.goodsImg.forEach(function(e) {
                var goodsImg = {};
                goodsImg.img = e;
                state.productImg.push(goodsImg);
            }, this);
    },
    // 购物车
    setShoppingCart(state,value){
        if(value.length==0){
            state.shoppingCartShow = false;
        }else{
            state.shoppingCartShow = true;
            value.map((e)=>{
                e.check = false;
            })
            state.shoppingCart = value;
        }
        
    } 
}

export default mutations;
